home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gwu / gvars.c < prev    next >
C/C++ Source or Header  |  1996-01-30  |  4KB  |  164 lines

  1. #define INIT(v) =v 
  2. #define GEN
  3.  
  4. #include "hdr.h"
  5. #include <stdio.h>
  6.  
  7.  
  8.   int    list_code INIT(0); /* set if GEN option selected */
  9.  
  10. #ifdef TBSN
  11. PREDEF_UNITS; /* predefined units */
  12. #endif
  13.  
  14.   int    debug_flag;
  15.   int    debug_line INIT(0);
  16.  
  17.   char *MAINunit; /* name of main unit (from MAIN opo */
  18.   char *interface_files;
  19.  
  20.  
  21.   int    bind_option; /* bind option */
  22.   int   bind_only_option INIT(0); /* set when binding only, no generation */
  23.   int    line_option INIT(0); /* LINE option use -L to set */
  24.   int    gen_option INIT(1); /* GEN option: set if want to generate code */
  25.  
  26.  
  27.   int ada_line; /* line number for error file (mixed_case) */
  28.   int save_ada_line; /* used to save value of ada_line  */
  29.  
  30.  
  31. #ifdef TBSN
  32. STIME; /* ?? time */
  33. BTIME; /* binding time */
  34. #endif
  35.  
  36.   int     NB_INSTRUCTIONS; /* number of instructions generated */
  37.   int     NB_STATEMENTS; /* number of statements processed?? */
  38.  
  39.   int     ERROR_IN_UNIT; /* boolean set if errors in unit */
  40.   int     STUBS_IN_UNIT; /* boolean set if stubs in unit */
  41.  
  42.   int     TARGET; 
  43.  
  44.  
  45.   Node    FIRST_NODE;         /* first node in a compilation unit */
  46.  
  47.   Tuple     UNIT_FIRST_NODE;     /* map { unit -> FIRST_NODE } */
  48.  
  49.  
  50.   Tuple    RENAME_MAP;          
  51.  
  52. #ifdef TBSN
  53. -- this is not referenced        ds 22-feb-85
  54.      Node ROOT_NODE;           /* root node of unit to be expanded */
  55. #endif
  56.  
  57.  
  58.  
  59.   Tuple    CODE_SLOTS;          /* map showing code_slots occupation */
  60.  
  61.   Tuple    DATA_SLOTS;          /* map showing data_slots occupation */
  62.  
  63.   Tuple    EXCEPTION_SLOTS;     /* map showing exception_slots occupation */
  64.   Tuple    CODE_SEGMENT_MAP;    /* map { number -> [actual code] } */
  65.   Tuple    DATA_SEGMENT_MAP;    /* map { number -> [actual data] } */
  66.  
  67.  
  68.   int    CURRENT_DATA_SEGMENT;   /* number of current data segment */
  69.   int    CURRENT_CODE_SEGMENT;   /* number of current code  segment */
  70.  
  71.   Tuple    GENERATED_OBJECTS;
  72.  
  73.  
  74.  
  75. #ifdef TBSN
  76.     MISC,           /* map used to store miscellanous infos like: */
  77.  
  78. #endif
  79.  
  80.   Tuple LOCAL_REFERENCE_MAP;
  81.  
  82.   int REFERENCE_SEGMENT;
  83.   int REFERENCE_OFFSET;
  84.  
  85. #ifdef TBSN
  86. Tuple    CONSTANT_MAP;
  87. #endif
  88.  
  89.  
  90.   int    LAST_OFFSET;    /* first available offset in current stack frame */
  91.   int    MAX_OFFSET;     /* largest offset in current stack frame */
  92.   int    TASKS_DECLARED; /* flag indicating possible presence of tasks in frame */
  93.   int    SPECS_DECLARED; /* count of # of specs requiring a */
  94.   Tuple  SUBPROG_SPECS; /* set of subprograms having an explicit spec in the */
  95.  
  96.   Tuple    SOURCE;         /* the current list of statements to be processed */
  97.  
  98.  
  99.   Tuple    EMAP;           /* Various temporary storage: */
  100.   Tuple    EMAP_VALUE; /* value of emap if defined, set by emap_get */
  101.  
  102.   int    CURRENT_LEVEL;  /* used for static depth of blocks */
  103.  
  104.   Tuple    PARAMETER_SET; /* Tuple of symbols for formal parameters */
  105.  
  106.   Tuple    RELAY_SET;
  107.  
  108.   Tuple    DANGLING_RELAY_SETS;
  109.  
  110.   Tuple    SUBPROG_PATCH;
  111.     
  112.   Tuple   CODE_PATCH_SET;
  113.   Tuple    DATA_PATCH_SET;
  114.  
  115.  
  116.   int    CURRENT_FIELD_NUMBER;
  117.   int    CURRENT_FIELD_OFFSET;
  118.   int    STATIC_REC; /* boolean */
  119.   Tuple   INTERNAL_ACCESSED_TYPES; /* of symbols */
  120.  
  121.   Tuple  axqfiles_read;        /* set of already read AXQfiles */
  122.   Tuple  call_lib_unit;        /* Accumulates code for idle_task to call library */
  123.   Tuple  PRECEDES_MAP;      /* Map representing relationship between units */
  124.   Tuple  DELAYED_MAP;
  125.   Tuple  compilation_table; /* Table of compilation units giving the order of */
  126.   Tuple  late_instances;    /* Map from unit unique name to a set of late */
  127.   Tuple interfaced_procedures;
  128.   int     interface_counter INIT(256);
  129.   int    interface_flag;    /* equals 1 if there are interfaced procedures, 
  130.                                       0 otherwise */
  131.  
  132.  
  133.   int deleted_instructions;
  134. #ifdef TBSN
  135.     optimizable_codes,
  136. #endif
  137.  
  138.  
  139.  
  140.      Tuple    just_read;
  141.   Node    unit_node;
  142.  
  143.   Symbol symbol_constrained_type;
  144.   Symbol symbol_accept_return INIT((Symbol)0); /* see gen_accept */
  145.   Symbol symbol_used,symbol_unused;
  146.   Symbol symbol_main_task;
  147.   Symbol symbol_type_mark;
  148.   Symbol symbol_task_block;
  149.   Symbol symbol_mulfix; /* expr.c ...*/
  150.  
  151.   long RAT_TOF_1,RAT_TOF_2;
  152.  
  153.   Explicit_ref explicit_ref_0; /* for explicit reference of [0,0] */
  154.   Tuple unit_slots  INIT((Tuple) 0);
  155.   int *ivalue_1,*ivalue_10; /* long integer forms of 1 and 10 */
  156.   Const int_const_0; /* Const for integer 0 */
  157.   Rational rat_value_10; /* 10 as rational */
  158.   Tuple global_reference_tuple INIT((Tuple)0);
  159.  
  160.   Const int_const_null_task; /* for NULL_TASK */
  161. #ifdef BINDER_GEN
  162.   int binder_phase  INIT(0); /* set non-zero if binder phase */
  163. #endif
  164.